package org.hdax.dm.consumer;

import org.hda.dm.utils.SmsUtil;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@RabbitListener(queues = "dmsms")
public class DmSmsConsumer {


    @RabbitHandler
    public void sendSms(Map<String,String> msg){
        SmsUtil.sendCode(msg.get("mobile"),msg.get("code"));
    }
}
